home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12722 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c,comp.os.ms-windows.programmer.win32
  4. Subject: Re: How can I check whether I file exists in a multi-user environment?
  5. Date: Tue, 02 Apr 96 12:17:22 GMT
  6. Organization: none
  7. Message-ID: <828447442snz@genesis.demon.co.uk>
  8. References: <4jh4tl$t4c_002@chem.uva.nl> <Dp1oM8.Cns@iquest.net> <4jjn1d$clu@solutions.solon.com> <Dp6sqL.Buz@iquest.net> <4jq0d3$9pd@solutions.solon.com>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4jq0d3$9pd@solutions.solon.com>
  15.            seebs@solutions.solon.com "Peter Seebach" writes:
  16.  
  17. >In article <Dp6sqL.Buz@iquest.net>, Doug Miller <dlmiller@iquest.net> wrote:
  18. >>seebs@solutions.solon.com (Peter Seebach) wrote:
  19. >>>The reason this is a poor solution is that it doesn't test for existance,
  20. >>>it tests for accessibility.
  21. >
  22. >>You should check your facts more carefully.  You evidently are unfamiliar
  23. >>with the behavior of access( ).  It is defined thusly:
  24. >
  25. >It isn't defined at all, except by various external standards.
  26. >
  27. >POSIX defines it one way.
  28.  
  29. And in such a way that you should never use access() unless you know what
  30. SETUID and SETGID mean and how they affect the operation of access(). Use
  31. stat(), or indeed fopen(), instead.
  32.  
  33. -- 
  34. -----------------------------------------
  35. Lawrence Kirby | fred@genesis.demon.co.uk
  36. Wilts, England | 70734.126@compuserve.com
  37. -----------------------------------------
  38.